import request from '@/utils/request'

// 查询资质产品管理列表
export function listQualification(query) {
  return request({
    url: '/qualificationInfo/qualification/list',
    method: 'get',
    params: query
  })
}

export function listQualificationOrgId(query) {
  return request({
    url: '/qualificationInfo/qualification/listOrgId',
    method: 'get',
    params: query
  })
}
//查询选择产品列表
export function listChange(query) {
  return request({
    url: '/qualificationInfo/qualification/changelist',
    method: 'get',
    params: query
  })
}

export function orgQualification() {
  return request({
    url: '/qualificationInfo/qualification/orgTree',
    method: 'get'
  })
}

export function listQualificationAll(query) {
  return request({
    url: '/qualificationInfo/qualification/listAll',
    method: 'get',
    params: query
  })
}

// 查询资质产品管理详细
export function getQualification(id) {
  return request({
    url: '/qualificationInfo/qualification/' + id,
    method: 'get'
  })
}

//选择主营产品
export function changeQualification(id) {
  return request({
    url: '/qualificationInfo/qualification/changeById/' + id,
    method: 'get'
  })
}

// 新增资质产品管理
export function addQualification(data) {
  return request({
    url: '/qualificationInfo/qualification',
    method: 'post',
    data: data
  })
}

// 修改资质产品管理
export function updateQualification(data) {
  return request({
    url: '/qualificationInfo/qualification',
    method: 'put',
    data: data
  })
}

// 删除资质产品管理
export function delQualification(id) {
  return request({
    url: '/qualificationInfo/qualification/' + id,
    method: 'delete'
  })
}
//审批
export function approveStatus(id, status) {
  return request({
    url: '/qualificationInfo/qualification/approve/' + id + '/' + status,
    method: 'get'
  })
}
//撤销审核
export function revokeNot(id) {
  return request({
    url: '/qualificationInfo/qualification/revoke/' + id,
    method: 'get'
  })
}
export function releaseStatus(id) {
  return request({
    url: '/qualificationInfo/qualification/release/' + id,
    method: 'get'
  })
}
export function examine(data) {
  return request({
    url: '/qualificationInfo/qualification/examine',
    method: 'post',
    data: data
  })
}

export function publicList(query) {
  return request({
    url: '/qualificationInfo/qualification/getList',
    method: 'get',
    params: query
  })
}

export function publicInfo(id) {
  return request({
    url: '/qualificationInfo/qualification/getInfo/'+id,
    method: 'get'
  })
}

export function apply(id) {
  return request({
    url: '/qualificationInfo/qualification/apply/'+id,
    method: 'get'
  })
}

export function getNo(no,id) {
  return request({
    url: '/qualificationInfo/qualification/getNo/'+no+"/"+id,
    method: 'get',
  })
}





